﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Item.Master" AutoEventWireup="true" CodeBehind="ImportButtonData.aspx.cs" Inherits="SGDemo.Permission.ImportButtonData" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">
    <script src="ImportButtonData.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpBody" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" border="0" class="ui-upload-layout">
            <tr>
                <td class="ui-upload-cell-odd">
                    选择文件:
                </td>
                <td class="ui-upload-cell-even">
                    <dx:ASPxUploadControl ID="uplImage" runat="server" ClientInstanceName="uploader"
                        BrowseButton-Text="浏览" ShowProgressPanel="True" Size="35" Width="300" OnFileUploadComplete="uplImage_FileUploadComplete">
                        <ClientSideEvents FileUploadComplete="function(s, e) { Uploader_OnFileUploadComplete(e); }"
                            FilesUploadComplete="function(s, e) { Uploader_OnFilesUploadComplete(e); }" FileUploadStart="function(s, e) { Uploader_OnUploadStart(); }"
                            TextChanged="function(s, e) { UpdateUploadButton(); }"></ClientSideEvents>
                        <ValidationSettings MaxFileSize="4194304" AllowedFileExtensions=".xml" NotAllowedFileExtensionErrorText="上次文件类型不正确！"
                            MaxFileSizeErrorText="上传文件大小超出4M！" GeneralErrorText="上传失败">
                        </ValidationSettings>    
                       <CancelButton Text="取消"></CancelButton>
                    </dx:ASPxUploadControl>
                </td>
            </tr>
            <tr>
                <td class="ui-upload-cell-odd">
                    说明：
                </td>
                <td class="note">
                    允许上传文件类型：.xml
                    <br />
                    允许文件大小：4M
                    <br />
                    导入数据前会把对应页面下的按钮等相关信息全部清空<br />
                </td>
            </tr>
            <tr>
                <td class="ui-upload-cell-odd">
                    下载：
                </td>
                <td>
                    <a href="../../../UploadFile/Template/导入按钮数据模板.xml" target="_blank"><b>导入按钮数据模板.xml</b></a>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" class="ui-upload-row">
                    <dx:ASPxButton ID="btnUpload" ClientInstanceName="btnUpload" runat="server" AutoPostBack="False"
                        Text="导入按钮数据" Width="100px" ClientEnabled="False">
                        <ClientSideEvents Click="function(s, e) { uploader.Upload(); }" />
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
